
SET TMP3G21="TEMP\TMP1.3G2"
SET TMP3G22="TEMP\TMP2.3G2"
SET TMPPICT="TEMP\TMP.JPG"
SET LOG="TEMP\COMMON.LOG"
SET ATOMINI="Camouflage_MOVIE_for_A5506T.ini"
SET QTINI="QT_3GPP2_QVGA_aac.ini"

DEL	%TMP3G21%
DEL	%TMP3G22%

IF NOT "%MODE%"=="0" GOTO L1
ECHO L0
"%CORES%\ffmpeg.exe"^
	-bitexact^
	-y^
	-i			%INPUT%^
	-timestamp	%TIME%^
	-f			3g2^
	-ss			%OFFSET%^
	-fs			%FS%^
	-acodec		libfaac^
	-vcodec		libxvid^
	-ar			44100^
	-ac			%AC%^
	-ab			%AB%k^
	-s			320x240^
	-b			%VB%k^
	-r			%FPS%^
	-vol		%VOL%^
	%TMP3G21%^
	>> %LOG% 2>&1

"%CORES%\QT3GPPFlatten.exe"^
	%TMP3G21%^
	%TMP3G22%^
	-c %QTINI%

"%CORES%\ATOMChanger.exe"^
	%TMP3G22%^
	%OUTPUT%^
	%ATOMINI%

EXIT /B 0

:L1
IF NOT "%MODE%"=="1" GOTO L2
ECHO L1

EXIT /B 1

:L2
IF NOT "%MODE%"=="2" GOTO L3
ECHO L2

"%CORES%\ffmpeg.exe"^
	-bitexact^
	 -y^
	 -i			%INPUT%^
	 -timestamp	%TIME%^
	 -f			3g2^
	 -ss		%OFFSET%^
	 -fs		%FS%^
	 -vn^
	 -acodec	libfaac^
	 -ab		%AB%k^
	 -ar		44100^
	 -ac		%AC%^
	 -vol		%VOL%^
				%TMP3G21%^
				>> %LOG% 2>&1

"%CORES%\ATOMChanger.exe"^
	%TMP3G21%^
	%OUTPUT%^
	%ATOMINI%

:L3
ECHO L3
